<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f"%>
<%@ taglib uri="/mytag" prefix="yjd"%>
<div class="wrap">
	<div class="nav">
		<div class="return">
			<a href='<yjd:url url="/doctor/all"/>'>返回上一页</a>
		</div>
	</div>
	<!-- start -->
	<form method="post" enctype="multipart/form-data" class="J_ajaxForm" autocomplete="off" action='<yjd:url url="/doctor/add/submit"/>'>
		<div class="table_full">
			<table width="100%">
				<tr>
					<th width="200">医生名称:</th>
					<td>
						<input name="name" type="text" class="input length_5" value="${doctor.name}">
						<input name="doctor_id" type="hidden" class="input length_5" value="${doctor.doctor_id}">
					</td>
				</tr>
				<tr>
					<th>医生头像:</th>
					<td>
						<input name="portrait_path" type="hidden" class="input length_5" value="${doctor.portrait_path}">
						<input name="doctor_imgfile" type="file" class="input length_5">
						<c:if test="${portrait_path != null}">(<a target="_black" href="${portrait_path}">已经上传，点击查看</a>)</c:if>
					</td>
				</tr>
				<tr>
					<th width="200">性别:</th>
					<td>
						<select name="gender" id="gender" class="mr10" >
							<option value="0" <c:if test="${doctor.gender == 0}">selected</c:if>>请选择</option>
							<option value="1" <c:if test="${doctor.gender == 1}">selected</c:if>>男</option>
							<option value="2" <c:if test="${doctor.gender == 2}">selected</c:if>>女</option>
						</select>
					</td>
				</tr>
				<tr>
					<th width="200">供职机构:</th>
					<td>
						<select name="org_id" id="org_id" class="mr10">
							<c:forEach items="${orgids }" var="item">
								<option ${item.key==doctor.org_id?"selected='selected'":"" } value="${item.key }">${item.value }</option>
							</c:forEach>
						</select>
					</td>
				</tr>
				<tr>
					<th width="100">热搜标签：(建议不要超过5个标签)</th>
					<td colspan="2">
						<table>
							<c:forEach items="${tagModelList }" var="item" varStatus="status">
							<c:if test="${status.count==0}" >
							<tr>
								</c:if>
								<c:if test="${status.count%8==1}" >
							</tr><tr>
							</c:if>
							<td><input type="checkbox" value="${item.tag_id }" name="tags" <c:if test="${item.strMap.isCheck==true}">checked</c:if>>${item.tag_name }</input></td>
							</c:forEach>
						</table>
					</td>
				</tr>
				<tr>
					<th>职位:</th>
					<td>
						<select name="position" id="position" class="mr10" >
							<c:forEach items="${doctorTitle }" var="item">
								<option ${item.key==doctor.position?"selected='selected'":"" } value="${item.key }">${item.value }</option>
							</c:forEach>
						</select>
					</td>
				</tr>
				<tr>
					<th>医生电话:</th>
					<td><input name="phone_number" type="text" maxlength="50" class="input length_5" value="${doctor.phone_number}" ></td>
				</tr>
				<tr>
					<th>医生简介:</th>
					<td><textarea rows="5" cols="60" name="intro">${doctor.intro}</textarea></td>
				</tr>
				<tr>
					<th>医生详情:</th>
					<td>
						<input name="detail_id" type="hidden" class="input length_5" value="${doctor.detail_id}">
						<textarea name="detail" class="J_editor">${doctor.strMap.detail}</textarea>
					</td>
				</tr>
				<tr>
					<th>是否启用:</th>
					<td>
						<label><input name="is_used" type="radio" value="1" <c:if test="${doctor.is_used == 1}">checked</c:if>/>是</label>
						<label><input name="is_used" type="radio" value="0" <c:if test="${doctor.is_used == 0}">checked</c:if> />否</label>
					</td>
				</tr>
				<tr>
					<th>是否推广:</th>
					<td>
						<label><input name="is_spread" type="radio" value="1" <c:if test="${doctor.is_spread == 1}">checked</c:if>/>是</label>
						<label><input name="is_spread" type="radio" value="0" <c:if test="${doctor.is_spread == 0}">checked</c:if> />否</label>
					</td>
				</tr>
			</table>
		</div>
		<input class="btn btn_submit J_ajax_submit_btn" type="submit" value="确认保存">
	</form>
</div>

<script>
    Upload_Config = {url : "${requestScope.FPWEB.rootPath }/resource/upload${requestScope.FPWEB.urlStuff}?type=3",uid : "${uid}",sign : "${sign}"};
    YJD.use('AppAdminCommon');
</script>
